<!DOCTYPE html>
<html ng-app="demoApp">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>ng-components-ui - 组件演示</title>
    <link rel="stylesheet" href="../dist/ng-components.css" />
    <style>
      * {
        box-sizing: border-box;
      }

      body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
        margin: 0;
        padding: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        min-height: 100vh;
      }

      .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 60px 20px;
      }

      .header {
        text-align: center;
        color: white;
        margin-bottom: 60px;
      }

      .header h1 {
        margin: 0 0 15px 0;
        font-size: 48px;
        font-weight: 700;
        letter-spacing: -1px;
      }

      .header p {
        margin: 0;
        font-size: 18px;
        opacity: 0.9;
      }

      .header .version {
        display: inline-block;
        margin-top: 15px;
        padding: 6px 16px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 20px;
        font-size: 14px;
        font-weight: 500;
      }

      .components-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
        margin-top: 40px;
      }

      .component-card {
        background: white;
        border-radius: 12px;
        padding: 28px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transition: all 0.3s;
        text-decoration: none;
        display: block;
        position: relative;
        overflow: hidden;
      }

      .component-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #667eea, #764ba2);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s;
      }

      .component-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      }

      .component-card:hover::before {
        transform: scaleX(1);
      }

      .component-icon {
        width: 48px;
        height: 48px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        margin-bottom: 16px;
      }

      .component-title {
        margin: 0 0 8px 0;
        color: #2d3748;
        font-size: 20px;
        font-weight: 600;
      }

      .component-desc {
        margin: 0;
        color: #718096;
        font-size: 14px;
        line-height: 1.6;
      }

      .component-tag {
        display: inline-block;
        margin-top: 12px;
        padding: 4px 12px;
        background: #edf2f7;
        color: #4a5568;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 500;
      }

      .section-title {
        color: white;
        font-size: 24px;
        font-weight: 600;
        margin: 40px 0 20px 0;
        padding-bottom: 10px;
        border-bottom: 2px solid rgba(255, 255, 255, 0.3);
      }

      .footer {
        text-align: center;
        color: white;
        margin-top: 60px;
        padding: 30px;
        opacity: 0.8;
        font-size: 14px;
      }

      @media (max-width: 768px) {
        .header h1 {
          font-size: 36px;
        }

        .components-grid {
          grid-template-columns: 1fr;
        }
      }
    </style>
  </head>
  <body ng-controller="DemoController">
    <div class="container">
      <div class="header">
        <h1>ng-components-ui</h1>
        <p>基于 AngularJS 的 UI 组件库</p>
        <span class="version">v1.0.0</span>
      </div>

      <div class="section-title">📦 核心组件</div>
      <div class="components-grid">
        <a href="confirm.html" class="component-card">
          <div class="component-icon">✓</div>
          <h3 class="component-title">Confirm 确认对话框</h3>
          <p class="component-desc">
            模态确认对话框，支持多种类型和自定义配置
          </p>
          <span class="component-tag">$confirm</span>
        </a>

        <a href="popover.html" class="component-card">
          <div class="component-icon">💬</div>
          <h3 class="component-title">Popover 弹出框</h3>
          <p class="component-desc">
            轻量级弹出框，支持复杂内容和多种触发方式
          </p>
          <span class="component-tag">ng-popover</span>
        </a>

        <a href="ng-toast.html" class="component-card">
          <div class="component-icon">📢</div>
          <h3 class="component-title">Toast 通知</h3>
          <p class="component-desc">
            消息通知组件，支持多种类型和自动关闭
          </p>
          <span class="component-tag">ngToast</span>
        </a>

        <a href="ng-loading.html" class="component-card">
          <div class="component-icon">⏳</div>
          <h3 class="component-title">Loading 加载</h3>
          <p class="component-desc">
            全屏加载遮罩，适用于异步操作场景
          </p>
          <span class="component-tag">$loading</span>
        </a>
      </div>

      <div class="section-title">📝 表单组件</div>
      <div class="components-grid">
        <a href="ng-select.html" class="component-card">
          <div class="component-icon">📋</div>
          <h3 class="component-title">Select 下拉选择</h3>
          <p class="component-desc">
            功能强大的下拉选择，支持搜索、多选、远程数据
          </p>
          <span class="component-tag">ng-select</span>
        </a>

        <a href="ng-date-picker.html" class="component-card">
          <div class="component-icon">📅</div>
          <h3 class="component-title">DatePicker 日期选择器</h3>
          <p class="component-desc">
            轻量级日期选择器，支持范围限制和自定义格式
          </p>
          <span class="component-tag">ng-date-picker</span>
        </a>

        <a href="radio.html" class="component-card">
          <div class="component-icon">🔘</div>
          <h3 class="component-title">Radio 单选框</h3>
          <p class="component-desc">
            单选按钮组件，支持分组和自定义样式
          </p>
          <span class="component-tag">ng-radio</span>
        </a>
      </div>

      <div class="section-title">🖊️ 富文本</div>
      <div class="components-grid">
        <a href="ng-tinymce.html" class="component-card">
          <div class="component-icon">✏️</div>
          <h3 class="component-title">TinyMCE 富文本</h3>
          <p class="component-desc">
            现代化富文本编辑器封装，支持自定义工具栏、语言包与只读模式
          </p>
          <span class="component-tag">ng-tinymce</span>
        </a>
      </div>

      <div class="section-title">📐 布局组件</div>
      <div class="components-grid">
        <a href="ng-layout.html" class="component-card">
          <div class="component-icon">📏</div>
          <h3 class="component-title">Layout 栅格布局</h3>
          <p class="component-desc">
            24栅格系统，支持响应式布局和灵活对齐
          </p>
          <span class="component-tag">ng-row / ng-col</span>
        </a>
      </div>

      <div class="section-title">🌲 数据展示</div>
      <div class="components-grid">
        <a href="tree.html" class="component-card">
          <div class="component-icon">🌳</div>
          <h3 class="component-title">Tree 树形控件</h3>
          <p class="component-desc">
            多级树形结构展示，支持展开/折叠和选择
          </p>
          <span class="component-tag">multi-level-tree</span>
        </a>

        <a href="tree-select.html" class="component-card">
          <div class="component-icon">📊</div>
          <h3 class="component-title">TreeSelect 树形选择</h3>
          <p class="component-desc">
            树形选择器，支持单选、多选和级联
          </p>
          <span class="component-tag">tree-select</span>
        </a>
      </div>

      <div class="section-title">🔧 第三方集成</div>
      <div class="components-grid">
        <a href="angular-strap.html" class="component-card">
          <div class="component-icon">⚡</div>
          <h3 class="component-title">Angular-Strap 集成</h3>
          <p class="component-desc">
            集成 Angular-Strap 组件库示例
          </p>
          <span class="component-tag">Bootstrap</span>
        </a>
      </div>

      <div class="footer">
        <p>
          基于 AngularJS 1.x 构建 |
          <a href="https://github.com" style="color: white; text-decoration: none;">GitHub</a>
        </p>
      </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/angular@1.8.3/angular.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/angular-strap@2.3.12/dist/angular-strap.min.js"></script>
    <script src="../dist/ng-components.js"></script>
    <script>
      angular.module("demoApp", ["ngComponents"]).controller("DemoController", function ($scope) {
        // 主页不需要特殊逻辑
      });
    </script>
  </body>
</html>
